<template>
  <div id="header">
    <div class="header-left"><div class="iconfont icon-fanhui"></div></div>
    <div class="header-input">
      <span class="iconfont icon-sousuo"></span>
      输入城市/景点/游玩主题
    </div>
    <router-link to="/city"><div class="header-right">{{this.$store.state.city}} <span class="iconfont icon-jiantou"></span></div></router-link>
  </div>
</template>

<script>
import { mapState } from 'vuex'
export default {
  name: 'homeheader',
  computed: {
    ...mapState({
      dCity: 'city'
    })
  }
}
</script>

<style lang="stylus" scoped="scoped">
  @import '~@/assets/style/stylus.styl'
  #header
    line-height  2.6875rem
    background-color $bgColor
    display flex
    color #fff
    .header-left
      width  2rem
      float left
      padding-left 8px
      .icon-left
        font-size 18px;
    .header-input
      flex 1
      background-color #FFFFFF
      color #ccc
      margin-top 0.375rem
      margin-right 0.375rem
      height 2rem;
      border-radius 5px
      line-height 2rem;
      padding-left 10px
      font-size: 14px;
    .header-right
      float right
      color #fff
      padding:0 4px;
      text-align center
      .icon-jiantou
        font-size 0.8125rem
        margin-left -2px
</style>
